| Miles Sound System SDK 7.2a |
MSSCHTC.CPP and MSSCHTS.CPP both rely heavily on multithreading to keep the various compression and decompression processes out of each others' way. Most of the execution time in each thread is spent waiting for data to become available from either WinSock or the mixer. The Voxware ASI codecs are guaranteed to be 100% thread-safe, but especially on the server side with two threads per client, it makes sense to be extremely careful with any shared variables and data structures to avoid deadlocks. MSSCHTS.CPP's mixer loop, which runs in the same thread as WinMain, uses CQueue, a rudimentary circular-buffer template, to isolate data being received and transmitted to each client.
Note that the data structures and synchronization methods in MSSCHTS and MSSCHTC have been chosen primarily for simplicity, and are intended more for illustrative purposes than as an attempt to wring every last cycle of performance out of the Win32 thread scheduler and WinSock API.
Next Topic (Bandwidth Optimization and Channel Reliability Tips)
Previous Topic (Mixing the Client Sound Data on the Server)
Group:
Implementing Voice Chat
For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.